Skip to content

i18n(plugin-sharing): ship the assignment rule object in all eleven platform languages - #30856

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-1jep1s
Nov 6, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-1jep1s

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

domain:server#1 · os-elon-musk · session_016WV4cya5ej5GQV86RPbRPK

Part of #30512 — a follow-up to package 8 (@objectstack/plugin-sharing, #30767): the assignment rule object sys_assignment_rule, which #30760 added to this package after #30767 landed. It folds in the translations #30066 owed for that object (landing note 6677585327), so no separate card is needed. The card stays open: settings and platform-objects follow, and the last PR of the series makes the bundle check read the platform locale table.

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么: 新对象「分配规则」(sys_assignment_rule) 的名称、说明、字段名与帮助、两组选项(分配给:队列 / 用户;选择成员:轮流 / 负载最少)和「按对象」视图名,补上英文以外全部 10 种语言(简中、日、西 + 繁中、阿、法、巴葡、俄、德、韩),每种 30 条。
  • 为什么改: feat(objectql,plugin-sharing): an organization authors its own assignment rules as sys_assignment_rule records #30760 加了这个对象,但没进本包的抽取配置,所以没有任何翻译;用任何非英文语言的管理员打开「设置 → 分配规则」都看到英文。本 PR 把它加进抽取配置,从此 check:i18n 也覆盖它。
  • 风险与回滚: 只改抽取配置的对象列表、与之同步的归属测试清单(一行)和翻译数据,不动逻辑、schema、接口;其它 5 个对象的译文一字未改。选项「队列」「用户」沿用各语言在队列、共享对象上的同一个词,「收件人类型叫法一致」的测试照常通过。回滚即撤 PR。
  • 先看: scripts/i18n-extract.config.ts(对象列表多了 SysAssignmentRule)和 src/translations/bundle-ownership.test.ts(同步加一行),再抽看任一语言 TAG.objects.generated.ts 的 sys_assignment_rule 段。
  • 两分钟验证: node scripts/check-i18n-bundles.mjs --filter=sharing 输出 plugins/plugin-sharing in sync;pnpm --filter @objectstack/plugin-sharing test 全绿。
  • 需要你做的: 无,席位落地。

What changes

  • scripts/i18n-extract.config.ts lists SysAssignmentRule beside the five objects it already extracts, so the repo's own os i18n extract --fill=default --source-hashes writes its 30 leaves into en.objects.generated.ts and every locale bundle, and check:i18n covers them from this PR on.
  • The 30 leaves (label, plural label, description, the field labels and help, the recipient_type options queue / user, the strategy options round_robin / least_loaded, and the by_object view) are translated in zh-CN, ja-JP, es-ES, zh-Hant, ar, fr, pt-BR, ru, de and ko.
  • Each locale reuses its existing vocabulary: the queue / user options read exactly as on sys_sharing_rule and sys_queue_member, "Organization", "Name", "Display Label", "Description", "Object", "Active" and "By Object" read as on sys_sharing_rule, and the object's name follows the word each locale's sys_queue help already uses for assignment rules (for zh-CN and ja-JP also the Setup menu entry feat(objectql,plugin-sharing): an organization authors its own assignment rules as sys_assignment_rule records #30760 added).
  • The load help names the least_loaded option by its translated label in each locale, and both expression examples (record.priority == "high", record.status != "closed") stay byte-identical.

Tests

  • bundle-ownership.test.ts (ADR-0029 D8) lists the objects the extract config owns and is red when the two lists differ; sys_assignment_rule is added to it, the one line this config change requires (without it the package suite fails: "bundle carries objects this package's extract config does not own").
  • recipient-vocabulary-consistency.test.ts already scans every object of every locale, so the new object is held to "one option key, one rendering per locale" with no edit.
  • No other test changes.

Acceptance notes

Verification

Package suite, typecheck, build (verify lock)
turbo run build --filter=!@objectstack/docs: 118/118 tasks successful, exit 0   (at 59684ad1, the patch before the ownership line)
pnpm --filter @objectstack/plugin-sharing test && typecheck   (at 8f3e8b49, the same patch on main c17719dd)
 Test Files  67 passed (67)
      Tests  1436 passed (1436)
check:test-typecheck: OK (tsconfig.test.json)
os-verify-lock: VERDICT command-exit 0
first run at 59684ad1, without the bundle-ownership.test.ts line: 1 failed (the ownership guard naming sys_assignment_rule), 1435 passed; VERDICT command-exit 1
i18n gates, the derived families and the docs & code guards lane
node scripts/check-i18n-bundles.mjs --filter=sharing           (at 753d30d0, this head)
check-i18n-bundles: OK (1 package(s) — all bundles in sync, no undeclared authoring keys).   EXIT 0
node scripts/check-i18n-stale-fill.mjs                          (at 753d30d0)
check-i18n-stale-fill: OK (11 bundle set(s) — no new stale fills, 1 baselined).   EXIT 0
dispatch-gates --commands (at 8f3e8b49): 61 families, each run and recorded with its exit code: 61 x exit 0
dispatch-gates --ran: 61 derived, 61 run, 0 NOT-MEASURED
pnpm lint (repo-wide, at 8f3e8b49): exit 0
CI lane "Lint · docs & code guards", every command run locally   (at 8f3e8b49)
  56 commands (lane-verdict excepted), 56 x exit 0, check-cli-command-ids included
re-derived at 753d30d0: 62 families, the 61 above plus `node scripts/ci/snapshot-next.mjs --self-test`
  (main added it to lint.yml's CI-engine job); run here: exit 0. `pnpm check:undeclared-dep-imports`
  (its script changed on main) re-run here: exit 0
changed lines 744 (+742 / -2), 16 files: under the 3000-line human-merge threshold

The branch is one commit on main ae82d057 (after #30830 landed). Its diff has the same patch id (0760465a) as 8f3e8b49, where the suite, the derived families, pnpm lint and the docs & code guards lane ran on main c17719dd; none of the main commits in between touches plugin-sharing. Both i18n checks and the two families that changed on main were re-run on this head.

Dogfood: not run — content-only package PR, no ! in the title and no (narrowing) arm.


Generated by Claude Code

…latform languages

sys_assignment_rule (added by #30760) joins the package's extract config,
so its en leaves are generated and check:i18n covers it. Its 30 leaves
(label, plural label, description, field labels and help, the recipient
and strategy options, the By Object view) are translated in zh-CN,
ja-JP, es-ES, zh-Hant, ar, fr, pt-BR, ru, de and ko. The recipient
options reuse each locale's existing words for Queue and User, so the
recipient-vocabulary consistency test holds across the queue, sharing and
assignment-rule objects. Native words equal to English (fr Description,
Condition; de Name) are recorded by the extractor as source copies.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cya5ej5GQV86RPbRPK
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

14 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • the SDK route bridge reached 63 of 222 client-bound route-ledger rows — the other 159 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 159: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 104 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 11 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 677d542a0e856d7ff88db8657d09740bff86273a → packageMentionDocs.

Which tree this was computed on

This run read content/docs from df41029848c8616546f2b26ae114550638524ffd — the merge of head 753d30d0dddcef25cdffcaede5110a1e3468769c into base 677d542a0e856d7ff88db8657d09740bff86273a, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin df41029848c8616546f2b26ae114550638524ffd && git checkout df41029848c8616546f2b26ae114550638524ffd
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 677d542a0e856d7ff88db8657d09740bff86273a 753d30d0dddcef25cdffcaede5110a1e3468769c && git checkout -B drift-repro 677d542a0e856d7ff88db8657d09740bff86273a && git merge --no-ff 753d30d0dddcef25cdffcaede5110a1e3468769c

node scripts/docs-audit/affected-docs.mjs --json 677d542a0e856d7ff88db8657d09740bff86273a

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#1 · os-elon-musk · session_016WV4cytLmJxfAmgPVjUbbW

席位核对 · ACCEPT · 2026-11-06T07:04Z · #30512 (plugin-sharing follow-up: sys_assignment_rule)

Head-sha: 753d30d

  • Shape: 16 files, +742/−2, all under packages/plugins/plugin-sharing/ plus one patch changeset. One commit on origin/main ae82d057. It is inside claim 6672078792 and seat order 6678748818, and it is not governed.
    • The extract config imports and lists SysAssignmentRule.
    • The generated en leaves and ten locale bundles each gain a sys_assignment_rule block (66 lines per locale).
    • Two source-hash entries were added: de name.label, and fr criteria.label / description.label. They mark strings whose translation equals the en source, which is how stale-fill records them.
    • The extra line is bundle-ownership.test.ts (ADR-0029 D8), which adds the object to its owned list. The guard's "keep the two lists in sync" requires it, and the body names it.
  • Folds in: [Decision] Can an organization author its own assignment rules, or do they stay package-declared only? #30066's owed translations for sys_assignment_rule, which landed with feat(objectql,plugin-sharing): an organization authors its own assignment rules as sys_assignment_rule records #30760 (landing note 6677585327).
  • Spot check (read in the diff):
    • The zh-CN block is natural Simplified Chinese. It keeps the CEL example record.priority == "high" verbatim, and its option labels cover both recipient_type values.
    • No added string in any locale starts with the article os , so check-cli-command-ids has nothing to read.
    • No assertion is relaxed.
  • Gates: every check-run on this head has concluded: 48 distinct checks, the latest run of each 35 success, 13 skipped, 0 failure. Locally (dev report 6679173885):
    • plugin-sharing 67 files / 1436 tests pass, typecheck VERDICT 0, tree build 118/118, and both i18n checks exit 0.
    • At 8f3e8b49 (the same patch id), the 61 derived families, pnpm lint and the docs & code guards lane (56) all exit 0.
    • At this head, the snapshot-next self-test (a family main added since) and check:undeclared-dep-imports exit 0.
  • Contract: Clause-②: no, Metadata-protocol: none, confirmed from the diff: translation bundles and a test list only.
  • Landing: ready, then auto-merge, through the relay. The card stays open for settings A and B.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 6, 2026 07:05
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 6, 2026 07:05
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit f41ddbd Nov 6, 2026
49 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-1jep1s branch November 6, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants